#include "MyGame.h"

MyGame::MyGame(HINSTANCE hins): Game(hins)
{
}

MyGame::~MyGame(void)
{
}


bool MyGame::onInit() 
{
	camara = new Camera();
	tex = Texture::Ptr(new Texture);
	cubo = new Mesh(0,0,0,"pepe", tex);

	tex->SetFilename("../data/azul.bmp");
	tex->SetHeight(128);
	tex->SetWidth(128);

	cubo->LoadFromXFile("../data/pava.x", *graph);
	cubo->SetScale(0.5f);


	//cubo->LoadFromXFile("../data/Cubo.x", *graph);
	//cubo->SetScale(100);

	//http://www.directxtutorial.com/tutorial9/b-direct3dbasics/dx9B9.aspx
	//para las luces.

	return true;
}
bool MyGame::onUpdate()
{
	camara->Update(input);
	graph->SetCamera(camara);

	return true;
}

bool MyGame::onDraw()
{
	//graph->LoadIdentity();
	//wnd.updateWindow();
	//wnd.drawWindow();
//	tMap->Draw(graph);
	//sprite->Draw(graph);
	//sprite2->Draw(graph);

	cubo->Draw(graph);
//	sha->Draw(graph);
	
	

	return true;
}
bool MyGame::onDeInit()
{
	
	return true;
}
